﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KEngine;
using UnityEngine;

namespace FrameWork.Plugins.HollowJ.common
{
    public class TypeDictionary
    {
        public static Dictionary<String, Type> types = new Dictionary<string, Type>();

        static TypeDictionary()
        {
            types.Add("UnityEngine.Sprite", typeof(Sprite));
            types.Add("UnityEngine.GameObject", typeof(GameObject));
        }

        public static Type GetTypeByName(string name)
        {
            Type type = types[name];
            if (type == null)
            {
                Log.Error("{0} not found the type", name);
            }

            return type;
        }
    }
}